const isLocal = window.isLocalEnv;

// 常用的本地配置
let config = {
  title: 'Biaxial Line Bar',
  y0AxisName: '',
  y1AxisName: '',
  xAxisName: '',
};
if (isLocal) {
  config = {
    title: '标题',
    y0AxisName: '111',
    y1AxisName: '222',
    xAxisName: '日期',
  };
}
import extraConfigEvent from '@/common/extra-config-event.js';
import { EMIT_PARAMS_OBJ } from '@/utils/constant';
import { $demoi18n } from '@/utils/lang';
import { xvueTheme } from '@/utils/util';
export default {
  isCustomProertyPannel: true,
  propertyPannelName: `config_${process.env.xvueNameSpace_}biaxial_line_bar`,
  config: {
    property: {
      title: config.title,
      isTitleSignVisiable: false,
      signMarginLeft: 10,
      verticalLineBackgroundColor: '#00ffff',
      y0AxisName: config.y0AxisName,
      y1AxisName: config.y1AxisName,
      xAxisName: config.xAxisName,
      xLabelRotate: 0, // x轴标签角度
      lineType: 'fillet',
      barShow: false,
      barNum: 6,
      barWidth: 10,
      legend: true,
      componentStyle: xvueTheme,
      color: 'color1',
      colorComponents: 'ColorThemeEditorCustom', // 自定义颜色模式
      y0LegendName: '',
      y1LegendName: '',
      tooltip: {
        isVisiable: false,
        vars: {},
        html: '',
        apis: [],
      },
      canAsTooltip: true,
      emptyDisp: 'tomographic', // tomographic continuous
      isDebounce: false,
      debounceTime: 5,
      noDataPromptType: 'defaultPrompt',
      noDataPrompt: '',
    },
    data: {
      dataSourceType: 'staticData',
      dataSource: '',
      apiCode: '',
      dataPackage: '',
      dataTable: '',
      redisKey: '',
      hasMarkLine: false,
      y0markLine: {
        value: '',
        color: '#FF0000',
      },
      y1markLine: {
        value: '',
        color: '#00ACFF',
      },
      autoRefresh: {
        switchEnable: false,
        actTypes: ['pull', 'push'],
        actType: 'pull',
        interval: 300,
      },
      tableData: [
        {
          field: 'x',
          mapping: 'date',
          explain: 'panelData.explain.horizontalAxis',
          hideLegendName: true,
        },
        {
          field: 'y1',
          mapping: 'sales',
          legendName: '',
          explain: 'panelData.explain.leftAxisCylindrical',
          isDelete: false,
        },
        {
          field: 'z1',
          mapping: 'cost',
          legendName: '',
          explain: 'panelData.explain.rightAxisBrokenLine',
          isDelete: false,
        },
      ],
    },
  },
  advancedLinkage: {},
  events: [
    {
      id: 'c85c0001-0001-4346-9b7a-1b7f04c8523r',
      key: 'biaxial-line-bar-click',
      label: '饼图点击事件',
      type: 'out',
      extraTpye: 'fieldName',
      description: '',
      parameters: [
        {
          id: '89d7f710-1230-45b1-bb87-7bcb8bec99e4',
          key: 'biaxial_line_bar_click_key',
          label: 'panelEvent.label.eventKey',
          value: '',
        },
        {
          id: 'dd788002-bpc2-4a32-a602-469090969e22',
          key: EMIT_PARAMS_OBJ,
          label: '发出参数对象',
          hide: true,
          value: '',
        },
      ],
    },
    {
      id: 'c85c5869-7162-4346-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa3598-6e9a-4882-b77b-782wsdfac7db',
          key: 'key-old-1',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: 'c85c5869-7162-8566-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa3598-6e9a-2589-b77b-782wsdfac7db',
          key: 'key-old-2',
          label: '',
          value: '',
        },
      ],
    },

    {
      id: '8f415960-d315-11ea-988b-c71201010d36',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '8f42b8f0-d315-11ea-988b-c71201010d36',
          key: 'key-old-3',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '8f42e000-d315-11ea-988b-c71201010d36',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: 'f4cf9440-d315-11ea-bf46-2557ecf0db55',
          key: 'key-old-4',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: 'f4d141f0-d315-11ea-bf46-2557ecf0db55',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: 'f4d141f1-d315-11ea-bf46-2557ecf0db55',
          key: 'key-old-5',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000001-7162-bnmj-9b7a-1b7f04c85999',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa3598-6e9a-grvs-b77b-782tgbfac999',
          key: 'key-1',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000002-d315-11ea-988b-c71201010d36',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '8f42b8f0-d315-11ea-988b-c71201010d36',
          key: 'key-2',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000003-d315-11ea-988b-c71201010d36',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: 'f4cf9440-d315-11ea-bf46-2557ecf0db55',
          key: 'key-3',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000004-d315-11ea-bf46-2557ecf0db55',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: 'f4d141f1-d315-11ea-bf46-2557ecf0db55',
          key: 'key-4',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000005-1000-rgbn-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa1000-1000-4882-b77b-782wsdfac7db',
          key: 'key-5',
          label: '',
          value: '',
        },
      ],
    },
    ...extraConfigEvent,
  ],
};
